package org.nowcoder.leetcode.bit;

/**
 * Title  : 172. Factorial Trailing Zeroes
 * Source : https://leetcode.cn/problems/factorial-trailing-zeroes/?envType=study-plan-v2&envId=top-interview-150
 * Author : XrazYang
 * Date   : 2023-08-24
 */

public class LeetCode_172 {
    public int trailingZeroes(int n) {
        int count = 0;
        while (n != 0) {
            n /= 5;
            count += n;
        }
        return count;
    }
}
